package javacafe.action.noticeboard;

import javacafe.action.Action;
import javacafe.action.ActionForward;
import javacafe.dto.bbspost.BbsPostDTO;
import javacafe.dto.event.WorkshopDTO;
import javacafe.serviceimple.BbsPostServiceImple;
import javacafe.serviceimple.WorkshopServiceImple;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DetailNoticeAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		// TODO Auto-generated method stub
		ActionForward actfoward = new ActionForward();		
		BbsPostServiceImple service = BbsPostServiceImple.getInstance();		
		BbsPostDTO dto = new BbsPostDTO();
		
		String bp_no = request.getParameter("seq");
		dto.setBp_no(Integer.parseInt(bp_no));
		dto.setBbs_no(1);
		
		dto = service.getBbsPost(dto);
				
		request.setAttribute("dto",dto);
		actfoward.setUrl("detailnotice");
		return actfoward;
	}

}
